점근 표기법

알고리즘의 시간 복잡도 설명에 사용하는 표기법. f(n)=O(n2)f(n) = O(n^2) 꼴로 쓴다.

On notation

Θ(g(n))\Theta(g(n)) is a set:

Because Θ(g(n))\Theta(g(n)) is a set, we could write "f(n)Θ(g(n))f(n) \in \Theta(g(n))" to indicate that f(n)f(n) is a member of Θ(g(n))\Theta(g(n)). Instead, we will usually write "f(n)=Θ(g(n))f(n)=\Theta(g(n))" to express the same notion.1

Minor abusing:

Since any constant is a degree-0 polynomial, we can express any constant function as Θ(n0)\Theta(n^0), or Θ(1)\Theta(1). This latter notation is a minor abuse, however, becuase the expression doesn not indicate what variable is tending to infinity. We shall often use the notation Θ(1)\Theta(1) to mean either a constant or a constant function with respect to some variable.

(The real problem is that our ordinary notation for functions does not distinguish functions from values. in Lambda calculus, the parameters to a function are clealy specified: the function n2n^2 could be written as λn.n2\lambda n.n^2, or even λr.r2\lambda r.r^2. Adopting a more rigorous notation, howevery, would complicate algebraic manipulations, and so we choose to tolerate the abuse.)1

Θ\Theta-notation (Big Theta notation)

정의:1

For a given function g(n),wedenotebyg(n), we denote by \Theta(g(n))$ the set of functions

Θ(g(n))\Theta(g(n)) = { f(n)f(n) such that there exist positive constants c1c_1, c2c_2, and n0n_0 such that 0c1g(n)f(n)c2g(n)0 \leq c_1 g(n) \leq f(n) \leq c_2 g(n) for all nn0n \geq n_0 .

설명:1

A function f(n)f(n) belongs to the set Θ(g(n))\Theta(g(n)) if there exist positive constants c1c_1 and c2c_2 such that it can be “sandwiched” between c1g(n)c_1 g(n) and c2g(n)c_2 g(n), for sufficiently large nn. … In other words, for all nn0n \geq n_0, the function f(n)f(n) is equal to g(n)g(n) to within a constant factor. We say that g(n)g(n) is an asymptotically tight bound for f(n)f(n).

Ω\Omega-notation (Big Omega notation)

O-notation (Big O notation)

Footnotes

  1. Chapter 3, Introduction to algorithms 2 3 4

2024 © ak